@import "./../theme";
@import "./../var";

$widget-form-container-space: 0.625rem;
$widget-form-container-shadow: #dbdde0 0 0.25rem 12px 1px;

.iss-form-renderer-preview {
  background: $bgColorPrimary;
  margin: 0 auto;
  border-radius: 0.2rem;
  z-index: 1000;

  .iss-form-renderer-container {
    width: 100%;
    height: 100%;
    max-height: 80vh;
    overflow: hidden;
    margin: auto;

    .el-scrollbar {
      height: calc(100% + 15px);
    }
  }

  &.pc {
    max-width: $maxFormPageWidth;
    min-width: $minFormPageWidth;
    margin: auto;
    border: 0;
    background: $bgColorPrimary;
    border-radius: 6px;
    height: 100%;

    .iss-form-renderer-container {
      height: 968px;
      width: 1024px;
    }
  }

  &.mobile {
    width: $minFormPageWidth+50px;
    height: 820px;
    margin: auto;
    border: 0;
    background: url("./../../images/form_design_mobile.png") no-repeat;
    background-position: center;
    background-size: contain;
    display: flex;
    align-items: center;
    justify-content: center;

    .iss-form-renderer-container {
      width: $minFormPageWidth;
      height: 668px;
      background: $bgColorPrimary;
      margin: auto;
      border-radius: 0.5rem;
      max-height: max-content !important;
    }
  }

  &.pad {
    width: $screen_xs_max;
    margin: auto;
    border: 0;
    background: $bgColorPrimary;
    border-radius: 1rem;

    .iss-form-renderer-container {
      height: 968px;
    }
  }
}

.platform-switch {
  position: absolute;
  top: 0.6rem;
  left: 0.7rem;

  &.btn-bar-plat {
    height: 100%;
    line-height: 100%;
    font-size: $fontSizeLarge;
    display: inline-block;

    a {
      width: $header-height;
      height: $header-height;
      color: $colorInfo;
      display: inline-block;
      text-align: center;
      line-height: $header-height;
      border-radius: $radiusRegular;
      margin-right: 5px;
      cursor: pointer;

      &.hover {
        background: $borderColorPrimary;
      }

      .btn-platform {
        width: $header-height;
        height: $header-height;
        background-position: center;
        background-repeat: no-repeat;
      }

      .btn-platform-pc {
        background-image: url("./../../images/pc_mode.svg");
      }

      .btn-platform-pad {
        background-image: url("./../../images/pad_mode.svg");
      }

      .btn-platform-mobile {
        background-image: url("./../../images/mobile_mode.svg");
      }

      &.active {
        .btn-platform-pc {
          background-image: url("./../../images/pc_mode_active.svg");
        }

        .btn-platform-pad {
          background-image: url("./../../images/pad_mode_active.svg");
        }

        .btn-platform-mobile {
          background-image: url("./../../images/mobile_mode_active.svg");
        }
      }
    }
  }
}
